import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * User: User
 * Date: 06.04.13
 * Time: 16:50
 * To change this template use File | Settings | File Templates.
 */
public class InvertArray {
    public static void main(String[] args)
    {
        int [] array = new int[] {1,2,3,4,5,6,7,8,9,10};
        System.out.println(Arrays.toString(array));
        int reversedArray [] = reverse(array);
        System.out.println(Arrays.toString(reversedArray));
    }

    public static int[] reverse(int array[]){
        int [] tmp = new int[array.length];
        for (int i=0;i<array.length;i++)
        {
            //  System.out.println("index" + i + " = " + array[i]);
            tmp[array.length-1-i] = array[i];
        }
        return tmp;
    }
}
